package com.yuyang.springcloud.controller;

import com.yuyang.springcloud.entities.CommonResult;
import com.yuyang.springcloud.entities.Payment;
import com.yuyang.springcloud.services.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yu yang
 * @date 2022/10/26 -21:12
 */
@RestController
public class PaymentController {
    @Autowired
    private PaymentService paymentService;
    @GetMapping(value = "/consumer/payment/get/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable("id") Long id)
    {
        return paymentService.getPaymentById(id);
    }
}
